|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IFormatter
This interface outlines the functions responsible for transforming dynamic
information into a language specific representation. Implementations of this
interface will receive a piece of data, such as a date, through the
corresponding function and produce a set of
org.eclipse.vtp.framework.interactions.core.media.Content
objects that contain the transformed information, e.g. a TextContent with
the text "Monday, March 31st, 2008".
| Method Summary | |
|---|---|
java.util.List |
formatDate(java.util.Date date,
java.lang.String formatDefinition,
IResourceManager resourceManager)
Transforms the supplied date information into a language specific sequence of elements following the given definition using the provided resource manager to locate file resources. If the definition is not recognized or invalid, the default definition should be used. |
java.util.List |
formatDigits(java.lang.String digits,
java.lang.String formatDefinition,
IResourceManager resourceManager)
Transforms the supplied string of digits into a language specific sequence of elements following the given definition using the provided resource manager to locate file resources. If the definition is not recognized or invalid, the default definition should be used. |
java.util.List |
formatLetters(java.lang.String text,
java.lang.String formatDefinition,
IResourceManager resourceManager)
Transforms the supplied string of letters into a language specific sequence of elements following the given definition using the provided resource manager to locate file resources. If the definition is not recognized or invalid, the default definition should be used. |
java.util.List |
formatMoney(java.math.BigDecimal money,
java.util.Currency currency,
java.lang.String formatDefinition,
IResourceManager resourceManager)
Transforms the supplied monetary amount into a language specific sequence of elements following the given definition using the provided resource manager to locate file resources. If the definition is not recognized or invalid, the default definition should be used. |
java.util.List |
formatNumber(int number,
java.lang.String formatDefinition,
IResourceManager resourceManager)
Transforms the supplied number into a language specific sequence of elements following the given definition using the provided resource manager to locate file resources. If the definition is not recognized or invalid, the default definition should be used. |
java.util.List |
formatOrdinal(int ordinal,
java.lang.String formatDefinition,
IResourceManager resourceManager)
Transforms the supplied ordinal value into a language specific sequence of elements following the given definition using the provided resource manager to locate file resources. If the definition is not recognized or invalid, the default definition should be used. |
java.lang.String |
getDefaultFormatDefintion(FormattableContent formattable,
java.lang.String formatName)
Returns the string representation of the specialization of the given name and for the given formattable content type. |
java.util.List |
getDefaultFormats(FormattableContent formattable)
Returns the List of Strings containing the
readable names of any built-in specializations available for given
formattable content. |
java.lang.String |
getLanguageCode()
|
java.lang.String |
getLanguageName()
|
| Method Detail |
|---|
java.lang.String getLanguageCode()
java.lang.String getLanguageName()
java.util.List formatDate(java.util.Date date,
java.lang.String formatDefinition,
IResourceManager resourceManager)
date - The date to translate to text.formatDefinition - The provided specialized format to use during
transformation.resourceManager - Provides access to the available file resources.
org.eclipse.vtp.framework.interactions.core.media.Content
objects that contain the formatted elements of the provided date.
java.util.List formatDigits(java.lang.String digits,
java.lang.String formatDefinition,
IResourceManager resourceManager)
digits - The digits to translate to text.formatDefinition - The provided specialized format to use during
transformation.resourceManager - Provides access to the available file resources.
org.eclipse.vtp.framework.interactions.core.media.Content
objects that contain the formatted elements of the provided sequence of
digits.
java.util.List formatMoney(java.math.BigDecimal money,
java.util.Currency currency,
java.lang.String formatDefinition,
IResourceManager resourceManager)
money - The amount to translate to text.currency - The currency the amount is in.formatDefinition - The provided specialized format to use during
transformation.resourceManager - Provides access to the available file resources.
org.eclipse.vtp.framework.interactions.core.media.Content
objects that contain the formatted elements of the provided monetary
value.
java.util.List formatNumber(int number,
java.lang.String formatDefinition,
IResourceManager resourceManager)
number - The number to translate to text.formatDefinition - The provided specialized format to use during
transformation.resourceManager - Provides access to the available file resources.
org.eclipse.vtp.framework.interactions.core.media.Content
objects that contain the formatted elements of the provided number.
java.util.List formatOrdinal(int ordinal,
java.lang.String formatDefinition,
IResourceManager resourceManager)
ordinal - The ordinal to translate to text.formatDefinition - The provided specialized format to use during
transformation.resourceManager - Provides access to the available file resources.
org.eclipse.vtp.framework.interactions.core.media.Content
objects that contain the formatted elements of the provided ordinal
value.
java.util.List formatLetters(java.lang.String text,
java.lang.String formatDefinition,
IResourceManager resourceManager)
letter - The letter to translate.formatDefinition - The provided specialized format to use during
transformation.resourceManager - Provides access to the available file resources.
org.eclipse.vtp.framework.interactions.core.media.Content
objects that contain the formatted elements of the provided string of
letters.java.util.List getDefaultFormats(FormattableContent formattable)
List of Strings containing the
readable names of any built-in specializations available for given
formattable content. Not all formattable content will have built-in
specializations.DigitsContent type of content. There are
some common rules around how a phone number is read back in contrast to
just a string of numbers.
formattable - The type of content to find specializations for.
java.lang.String getDefaultFormatDefintion(FormattableContent formattable,
java.lang.String formatName)
formattable - The type of content to retrieve the definition for.formatName - The name of the definition.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||